package com.iMusic.businessLogicLayer.testCase;

import com.iMusic.businessLogicLayer.TaxManager;
import junit.framework.Assert;
import junit.framework.TestCase;

public class TestTaxManagerCase extends TestCase{
	
	static TaxManager taxManager = null;
	
	public void testgetFederalTax(){
		
		if (taxManager == null) {
			taxManager = TaxManager.getInstance();
		}
		
		double test = taxManager.getFederalTax(100);
		System.out.println(test);
		Assert.assertEquals("Federal Tax Error!", 5.0, test, 0.1);
	
	}
	
	public void testgetProvincialTax(){
		
		if (taxManager == null) {
			taxManager = TaxManager.getInstance();
		}
		double test = taxManager.getProvincialTax("QC",100);
		System.out.println(test);
		Assert.assertEquals("Provincial Tax Error!", 10.47, test, 0.1);
	
	}

}
